def assert_if(condition, error_msg: str):
    """
    如果condition为False, 则会抛出异常
    """
    if not condition:
        raise Exception(error_msg)


if __name__ == '__main__':
    print("start")
    assert_if(True, "出现Error")
    print("end")
